package com.teng.demo04.mapper;

import com.teng.demo04.entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface BookMapper {
    //显示所有书籍
    List<Book> bookList();

    //按照书籍名称模糊查询
    List<Book> queryBookByName(String bookName);

    //按照bookid查询指定书籍
    Book queryBook(int bookID);

    //修改书籍信息
    void updateBook(Book book);

    //增加书籍信息
    void addBook(Book book);

    //删除书籍
    void deleteBook(@Param("bookID")int id);
}
